]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: Announce search result description to screen readers
authorLukáš Tyrychtr <ltyrycht@redhat.com>
Mon, 8 Jun 2026 13:50:36 +0000 (15:50 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 29 Jun 2026 17:47:44 +0000 (19:47 +0200)
Add a described by relation to the search button so the description is read
when the button gets focus.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4251>
(cherry picked from commit a6bb705d7abb1e867b117e66a03dba6c8ba8cb45)

js/ui/search.js

index 334f1243ad074a7a9dd1d7e22f4bc020c4159b5d..9ded1418490a9afea232eb05d902406d10c1fc0d 100644 (file)
@@ -1,3 +1,4 @@
+import Atk from 'gi://Atk';
 import Clutter from 'gi://Clutter';
 import Gio from 'gi://Gio';
 import GLib from 'gi://GLib';
@@ -112,6 +113,10 @@ class ListSearchResult extends SearchResult {
             });
             content.add_child(this._descriptionLabel);
 
+            this.get_accessible().add_relationship(
+                Atk.RelationType.DESCRIBED_BY,
+                this._descriptionLabel.get_accessible());
+
             this._resultsView.connectObject(
                 'terms-changed', this._highlightTerms.bind(this), this);